package ru.ifmo.network.skype.network.data;

import java.net.InetAddress;

/**
 * @author avhaliullin
 */
public class UserAddress {
    private final InetAddress ipAddress;

    public UserAddress(InetAddress ipAddress) {
        this.ipAddress = ipAddress;
    }

    public InetAddress getIpAddress() {
        return ipAddress;
    }

    public boolean equals(Object o) {
        return o != null && (o instanceof UserAddress) && ipAddress.equals(((UserAddress) o).getIpAddress());
    }

    public int hashCode() {
        return ipAddress.hashCode();
    }
}
